package controllers;

import java.util.ArrayList;
import java.util.List;

import models.Log;
import models.Organization;
import play.mvc.Controller;

public class LogController extends Controller {

	/**
	 * shows the log list of the organization
	 * 
	 * @param OrganizationId
	 *            it takes the organization id so that it would get the log
	 *            containing this organization.
	 * 
	 * @author Mai Selwanes
	 */
	public static void logView(long OrganizationId) {

		Organization organization = Organization.findById(OrganizationId);
		List<Log> logList = Log.find("organization LIKE ?", organization)
				.fetch();
		render(organization, logList);
	}

}
